<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8" />
    <title>A2Z Solution | Quản trị website</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    <meta content="" name="description" />
    <meta content="" name="author" />
    <link href="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <link href="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/css/metro.css" rel="stylesheet" />
    <link href="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <link href="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/css/style.css" rel="stylesheet" />
    <link href="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/css/style_responsive.css" rel="stylesheet" />
    <link href="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/css/style_default.css" rel="stylesheet" id="style_color" />
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/uniform/css/uniform.default.css" />
    <link rel="shortcut icon" href="<?php echo Yii::app()->request->baseUrl; ?>/favicon.ico" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="login">
<!-- BEGIN LOGO -->
<div class="logo">
    <img src="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/img/logo-big.png" alt="" />
</div>
<!-- END LOGO -->
<!-- BEGIN LOGIN -->
<!--<div class="content">
    <?php /*echo $content*/?>
</div>-->
<div class="content">
    <!-- BEGIN LOGIN FORM -->
    <?php $form = $this->beginWidget('CActiveForm', array(
        'id' => 'login-form',
        'enableAjaxValidation' => false,
        'htmlOptions'=>array(
            'class'=>'form-vertical login-form'
        ),
        'action'=>'/users/login'
    )); ?>

        <h3 class="form-title">Đăng nhập hệ thống</h3>
        <?php if(Yii::app()->user->hasFlash('error')):?>
        <div class="alert alert-error">
            <span><?php echo Yii::app()->user->getFlash('error'); ?></span>
        </div>
	    <?php endif; ?>
        <div class="control-group">
            <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
            <label class="control-label visible-ie8 visible-ie9">Tên đăng nhập</label>
            <div class="controls">
                <div class="input-icon left">
                    <i class="icon-user"></i>
                    <?php echo $form->textField($loginModel, 'username', array('class' => 'm-wrap placeholder-no-fix', 'placeholder'=>'Username')); ?>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label visible-ie8 visible-ie9">Mật khẩu</label>
            <div class="controls">
                <div class="input-icon left">
                    <i class="icon-lock"></i>
                    <?php echo $form->passwordField($loginModel, 'password', array('class' => 'm-wrap placeholder-no-fix', 'placeholder'=>'Password')); ?>
                </div>
            </div>
        </div>
        <div class="form-actions">

            <button type="submit" class="btn green pull-right">
                Đăng nhập <i class="m-icon-swapright m-icon-white"></i>
            </button>
        </div>
        <div class="forget-password">
            <h4>Quên mật khẩu ?</h4>
            <p>
                Vui lòng click vào <a href="javascript:;" class="" id="forget-password">đây</a> để thiết lập lại mật khẩu
            </p>
        </div>
    <?php $this->endWidget(); ?>
    <!-- END LOGIN FORM -->
    <?php $form = $this->beginWidget('CActiveForm', array(
        'id' => 'forget-form',
        'action'=>Yii::app()->createUrl('/users/forgot-pass'),
        'enableAjaxValidation' => false,
        'htmlOptions'=>array(
            'class'=>'form-vertical forget-form'
        )
    )); ?>
    <!-- BEGIN FORGOT PASSWORD FORM -->
        <h3 class="">Quên mật khẩu ?</h3>
        <p>Nhập email để thiết lập lại mật khẩu.</p>
        <div class="control-group">
            <div class="controls">
                <div class="input-icon left">
                    <i class="icon-envelope"></i>
                    <?php echo $form->textField($loginModel, 'email', array('class' => 'm-wrap placeholder-no-fix', 'placeholder'=>'Email')); ?>
                </div>
            </div>
        </div>
        <div class="form-actions">
            <button type="button" id="back-btn" class="btn">
                <i class="m-icon-swapleft"></i> Quay lại
            </button>
            <button type="submit" class="btn green pull-right">
                Đồng ý <i class="m-icon-swapright m-icon-white"></i>
            </button>
        </div>
    <?php $this->endWidget(); ?>
    <!-- END FORGOT PASSWORD FORM -->

</div>
<!-- END LOGIN -->
<!-- END LOGIN -->
<!-- BEGIN COPYRIGHT -->
<div class="copyright">
    2014 &copy; PetitPoint. Quản trị website.
</div>
<!-- END COPYRIGHT -->
<!-- BEGIN JAVASCRIPTS -->
<script src="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/js/jquery-1.8.3.min.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/bootstrap/js/bootstrap.min.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/uniform/jquery.uniform.min.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/js/jquery.blockui.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/libs/assets/js/app.js"></script>
<script>
    jQuery(document).ready(function() {
        App.initLogin();
    });
</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>